# vim: filetype=yaml sw=2
version: 0.31
git_url: https://git.torproject.org/pluggable-transports/meek.git
git_hash: '[% c("version") %]'
tag_gpg_id: 1
gpg_keyring: meek.gpg
filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'

build: '[% c("projects/go/var/build_go_lib") %]'

var:
  container:
    use_container: 1
  go_lib: git.torproject.org/pluggable-transports/meek
  go_lib_install:
    - git.torproject.org/pluggable-transports/meek/meek-client
    - git.torproject.org/pluggable-transports/meek/meek-client-torbrowser
  go_lib_deps:
    - goptlib
  go_lib_ldflags: '-s'
  go_lib_no_output: 1
  build_go_lib_post: |
    [% c("var/set_PTDIR_DOCSDIR") -%]
    mkdir -p $PTDIR $DOCSDIR

    cp -a $GOTARGETBIN/* $PTDIR

    cd "$GOPATH/src/git.torproject.org/pluggable-transports/meek/"
    cp -a README doc/*.1[% IF c("var/windows") %].txt[% END %] $DOCSDIR

    cd firefox
    [% c('zip', {
        zip_src => [ '.' ],
        zip_args => '$distdir/meek-http-helper@bamsoftware.com.xpi',
      }) %]

    cd $distdir
    [% c('tar', {
            tar_src => [ '.' ],
            tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
        }) %]

targets:
  windows:
    var:
      go_lib_install:
        - git.torproject.org/pluggable-transports/meek/meek-client
        - git.torproject.org/pluggable-transports/meek/meek-client-torbrowser
        - git.torproject.org/pluggable-transports/meek/terminateprocess-buffer

input_files:
  - project: container-image
  - name: go
    project: go
  - name: goptlib
    project: goptlib
